package cn.itsource.itsource.util;

public class AjaxResult {
    private Boolean success;
    private String  msg;
    private Object data;


    public static AjaxResult success(String msg){
        AjaxResult result=new AjaxResult();
        result.setSuccess(true);
        result.setMsg(msg);
        return  result;

    }
    public static AjaxResult error(String msg){
        AjaxResult result=new AjaxResult();
        result.setSuccess(false);
        result.setMsg(msg);
        return  result;

    }



    public Boolean getSuccess() {
        return success;
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return  this;
    }

    public String getMsg() {
        return msg;
    }

    public AjaxResult setMsg(String msg) {
        this.msg = msg;
        return  this;
    }

    public Object getData() {
        return data;
    }

    public AjaxResult setData(Object data) {
        this.data = data;
        return  this;
    }


}
